{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="content"}
<form id='water_config' action=''  method='post'>
<div class="formitems inline">  
    <label class="fi-name"><span class="colorRed"></span>短信开启/关闭：</label>  
    <div class="form-controls">  
        <div class="radio-group">  
            <label><input type="radio" name="open" value='1' {if $sms_open == 1}checked{/if}>开启</label>  
            <label><input type="radio" name="open" value='0' {if $sms_open == 0}checked{/if}>关闭</label>  
        </div>  
        <span class="fi-help-text">您当前可发送 <font style='color:#000000;font-weight:bold;' class='flag_total'>{$left_total}</font> 条短信</span>
        <a href='/AcpConfig/sms_pay/mod_id/0'>充值短信</a>  
    </div>  
</div>
<div class="formitems inline">  
    <label class="fi-name"><span class="colorRed"></span>短信服务商：</label>  
    <div class="form-controls">  
        <div class="radio-group">  
            <label><input type="radio" name="sms_type" value='1' {if $sms_type == 1}checked="checked"{/if} >网建</label>  
            <label><input type="radio" name="sms_type" value='2' {if $sms_type == 2}checked="checked"{/if} >创蓝</label>  
        </div>  
    </div>  
</div>
<div class="formitems inline">  
    <label class="fi-name"><span class="colorRed"></span>管理员设置：</label>  
    <div class="form-controls">  
        <input type="text" value='{$sms_mobile}' name='sms_mobile' placeholder=""> 
        <span class='btn test_send'>测试发送</span>
        <span class="fi-help-text">短信发送速度视网络情况会略有延迟。</span>  
    </div>  
</div> 
<div class="formitems inline">  
    <label class="fi-name"><span class="colorRed"></span>设置短信发送动作：</label>  
    <div class="form-controls"> 
   	 	<div class="sms_con_box"> 
            <div class="checkbox-group">  
                <label><input type="checkbox" name="order_create_state" value='1' {if $sms_config.order_create.state == 1}checked{/if}>订单创建时</label>  
				<label><input type="checkbox" name="order_create_to_admin" value='1' {if $sms_config.order_create.to_amdin == 1}checked{/if}>抄送管理员</label>
                <input type='hidden' name='order_create' value='{$sms_config.order_create.default_sms_text}'><a class='rest colorff6645' href="javascript:;">恢复默认模板</a>
            </div> 
            <div class="formitems inline">  
                <div class="sms-name">订单创建时 短信内容</div>  
                <div class="sms-controls">  
                    <textarea name="now_order_create" id="rest_order_create">{$sms_config.order_create.sms_text}</textarea>  
                </div>  
            </div>
            <div class="sms-but">
                <a href="javascript:;" class="btn btn-blue sms_save"><i class="gicon-check white"></i>保存</a>  
                <a href="javascript:;" class="btn rest_now"><i class="gicon-repeat"></i>取消 </a>
            </div>
        </div>
          
    	<div class="sms_con_box"> 
            <div class="checkbox-group">  
                <label><input type="checkbox" name="order_check_state" value='1' {if $sms_config.order_check.state == 1}checked{/if}>订单确认时</label>  
                <label><input type="checkbox" name="order_check_to_admin" value='1' {if $sms_config.order_check.to_admin == 1}checked{/if}>抄送管理员</label> 
                <input type='hidden' name='order_check' value='{$sms_config.order_check.default_sms_text}'><a class='rest colorff6645' href="javascript:;">恢复默认模板</a>
            </div> 
            <div class="formitems inline">  
                <div class="sms-name">订单确认时 短信内容</div>  
                <div class="sms-controls">  
                    <textarea name="now_order_check" id="rest_order_check">{$sms_config.order_check.sms_text}</textarea>  
                </div>  
            </div>
            <div class="sms-but">
                <a href="javascript:;" class="btn btn-blue sms_save"><i class="gicon-check white"></i>保存</a>  
                <a href="javascript:;" class="btn rest_now"><i class="gicon-repeat"></i>取消 </a>
            </div>
        </div> 
        
        <div class="sms_con_box"> 
            <div class="checkbox-group">  
                <label><input type="checkbox" name="order_pay_state" value='1' {if $sms_config.order_pay.state == 1}checked{/if}>订单付款时</label>  
                <label><input type="checkbox" name="order_pay_to_admin" value='1' {if $sms_config.order.to_admin == 1}checked{/if}>抄送管理员</label> 
                <input type='hidden' name='order_pay' value='{$sms_config.order_pay.default_sms_text}'><a class='rest colorff6645' href="javascript:;">恢复默认模板</a>
            </div> 
            <div class="formitems inline">  
                <div class="sms-name">支付订单时 短信内容</div>  
                <div class="sms-controls">  
                    <textarea name="now_order_pay" id="rest_order_pay">{$sms_config.order_pay.sms_text}</textarea>  
                </div>  
            </div>
            <div class="sms-but">
                <a href="javascript:;" class="btn btn-blue sms_save"><i class="gicon-check white"></i>保存</a> 
                <a href="javascript:;" class="btn rest_now"><i class="gicon-repeat"></i>取消 </a> 
            </div>
        </div>
        
        <div class="sms_con_box"> 
            <div class="checkbox-group">  
                <label><input type="checkbox" name="order_ship_state" value='1' {if $sms_config.order_ship.state == 1}checked{/if}>订单发货时</label>  
                <label><input type="checkbox" name="order_ship_to_admin" value='1' {if $sms_config.order_ship.to_admin == 1}checked{/if}>抄送管理员</label>
                <input type='hidden' name='order_ship' value='{$sms_config.order_ship.default_sms_text}'><a class='rest colorff6645' href="javascript:;">恢复默认模板</a>
            </div> 
            <div class="formitems inline">  
                <div class="sms-name">订单发货时 短信内容</div>  
                <div class="sms-controls">  
                    <textarea name="now_order_ship" id="rest_order_ship">{$sms_config.order_ship.sms_text}</textarea>  
                </div>  
            </div>
            <div class="sms-but">
                <a href="javascript:;" class="btn btn-blue sms_save"><i class="gicon-check white"></i>保存</a>  
                <!-- <button type="reset" class="btn">取消</button> -->
            </div>
        </div> 
        
        <div class="sms_con_box"> 
            <div class="checkbox-group">  
                <label><input type="checkbox" name="set_psw_state" value='1' {if $sms_config.set_psw.state == 1}checked{/if}>发送验证码时</label>  
<!--                <label><input type="checkbox" name="set_psw_to_admin" value='1' {if $sms_config.set_psw.to_admin == 1}checked{/if}>抄送管理员</label> -->
                <input type='hidden' name='set_psw' value='{$sms_config.set_psw.default_sms_text}'><a class='rest colorff6645' href="javascript:;">恢复默认模板</a>
            </div> 
            <div class="formitems inline">  
                <div class="sms-name">用户找回密码或绑定解绑手机时  短信内容</div>  
                <div class="sms-controls">  
                    <textarea name="now_set_psw" id="rest_set_psw">{$sms_config.set_psw.sms_text}</textarea>  
                </div>  
            </div>
            <div class="sms-but">
                <a href="javascript:;" class="btn btn-blue sms_save"><i class="gicon-check white"></i>保存</a>  
                <a href="javascript:;" class="btn rest_now"><i class="gicon-repeat"></i>取消 </a>
            </div>
        </div>
<!--         
        <div class="sms_con_box"> 
            <div class="checkbox-group">  
                <label><input type="checkbox" name="user_reg_state" value='1' {if $sms_config.user_reg.state == 1}checked{/if}>用户注册时</label>  
                <label><input type="checkbox" name="user_reg_to_admin" value='1' {if $sms_config.user_reg.to_admin == 1}checked{/if}>抄送管理员</label>  
                <input type='hidden' name='user_reg' value='{$sms_config.user_reg.default_sms_text}'><a class='rest colorff6645' href="javascript:;">恢复默认模板</a>
            </div> 
            <div class="formitems inline">  
                <div class="sms-name">用户注册时 短信内容</div>  
                <div class="sms-controls">  
                    <textarea name="now_user_reg" id="rest_user_reg">{$sms_config.user_reg.sms_text}</textarea>  
                </div>  
            </div>
            <div class="sms-but">
                <a href="javascript:;" class="btn btn-blue sms_save"><i class="gicon-check white"></i>保存</a>  
                <a href="javascript:;" class="btn rest_now"><i class="gicon-repeat"></i>取消 </a>
            </div>
        </div>
  -->      
        <div class="sms_con_box"> 
            <div class="checkbox-group">  
                <label><input type="checkbox" name="admin_login_state" value='1' {if $sms_config.admin_login.state == 1}checked{/if}>管理员登录时</label>  
<!--            <label><input type="checkbox" name="admin_login_to_admin" value='1' {if $sms_config.admin_login.to_admin == 1}checked{/if}>抄送管理员</label>-->  
                <input type='hidden' name='admin_login' value='{$sms_config.admin_login.default_sms_text}'><a class='rest colorff6645' href="javascript:;">恢复默认模板</a>
            </div> 
            <div class="formitems inline">  
                <div class="sms-name">管理员登录时 短信内容</div>  
                <div class="sms-controls">  
                    <textarea name="now_admin_login" id="rest_admin_login">{$sms_config.admin_login.sms_text}</textarea>  
                </div>  
            </div>
            <div class="sms-but">
                <a href="javascript:;" class="btn btn-blue sms_save"><i class="gicon-check white"></i>保存</a>  
                <a href="javascript:;" class="btn rest_now"><i class="gicon-repeat"></i>取消 </a>
            </div>
        </div>
    </div>  
</div>   

<div class="formitems inline">  
    <label class="fi-name"></label>  
    <div class="form-controls">
   		<input type='hidden' name='act' value='set_all' />  
		<button type="submit" class="btn btn-blue"><i class="gicon-check white"></i>保存</button>
        <button type="reset" class="btn"><i class="gicon-repeat"></i>重置</button> 
    </div>  
</div>
</form>  
{/block} 

{block name="js"}
<script src='__ACPJS__/AcpConfig/sms_config.js?version={$version}'></script>
{/block} 

{block name="css"}
<style>
.sms_con_box{ width:100%; margin-bottom:20px;}
.sms-name{ height:32px; line-height:32px; overflow:hidden;}
.sms-controls{ overflow:hidden;}
.sms-but{ height:32px; overflow:hidden;}
</style>
{/block}
